/*
 * CommandePeser.cpp
 *
 *  Created on: 19 nov. 2012
 *      Author: aboursie - potier
 */

#include "CommandePeser.h"

void CommandePeser::execute() {
	try{
		robot->peser();
	}catch (EtatRobot::BadAction){
		pile.pop();
	}
}

Commande* CommandePeser::constructeurVirtuel() {
	Commande* tmp = new CommandePeser(robot);
	pile.push(tmp);
	return tmp;
}

void CommandePeser::desexecute() {
	pile.pop();
	this->robot->notify();
}
